<script>
  // 为空数组添加元素
  var height = [];
  height[5] =  183;
  height[0] =  175;
  height[3] =  150;
  console.log(height);      // 输出结果：(6) [175, empty × 2, 150, empty, 183]
  // 为非空数组添加元素
  var arr = ['Asa', 'Taylor'];
  arr[2] = 'Tom';
  arr[3] =  'Jack';
  console.log(arr);         // 输出结果：(4) ["Asa", "Taylor", "Tom", "Jack"]
</script>

<script>
  var arr = ['a', 'b', 'c', 'd'];
  arr[2] = 123;
  arr[3] = 456;
  console.log(arr);         // 输出结果：(4) ["a", "b", 123, 456]
</script>